<!-- template inhertance -->
<extend name="layout/layui24"/>

<!-- styles -->
<block name="linkcss">
    <style>
        .table {
            font-size: 12px;
        }
        .table tr td {
            vertical-align: middle !important;
        }
    </style>
</block>

<!-- scripts -->
<block name="linkjs">

</block>

<!-- page title -->
<block name="webtitle">
    <title>样品汇总</title>
</block>

<!-- navagations -->
<block name="breadcrumb">
    <ol class="breadcrumb breadcrumb-edit">
        <li><a href="index">样品管理</a></li>
        <li class="active">样品汇总</li>
    </ol>
</block>

<!-- main body -->
<block name="content">

    <!-- 列表 -->
    <table class="table table-bordered table-hover">
        <thead>
            <tr>
                <th width="50">序号</th>
                <th width="145">订单号</th>
                <th width="61">销售</th>
                <th width="100">产品类型</th>
                <th width="145">产品型号</th>
                <th>备注</th>
                <th width="75">设备品牌</th>
                <th width="90">设备型号</th>
                <th>当前进度</th>
            </tr>
        </thead>
        <tbody>
            <notempty name="samples">
                <volist name="samples" id="vo" key="samples_key">
                    <volist name="vo.details" id="item" key="details_k">
                        <tr>
                            <if condition="$details_k eq 1">
                                <td rowspan="{:count($vo['details'])}">{$samples_key}</td>
                                <td rowspan="{:count($vo['details'])}">{$vo.sample_order}</td>
                                <td rowspan="{:count($vo['details'])}">{$vo.sales_name}</td>
                                <else/>
                            </if>
                            <td>{$item.product_type}</td>
                            <td>{$item.product_model}</td>
                            <td>{$item.remark}</td>
                            <td>
                                <notempty name="item.brand">
                                    {$item.brand}
                                    <else/>
                                    无
                                </notempty>
                            </td>
                            <td>
                                <notempty name="item.brand">
                                    {$item.model}
                                    <else/>
                                    无
                                </notempty>
                            </td>
                            <td>
                                <eq name="item.product_progress.progress_value" value="10"> {//是否是最后一个步骤}
                                    <span class="tag tag-success">{$item.product_progress.progress_label}</span>
                                    <else/>
                                    <span class="tag">{$item.product_progress.progress_label}</span>
                                </eq>
                            </td>
                        </tr>
                    </volist>
                </volist>
                <else/>
                <tr>
                    <td colspan="9">
                        <div class="text-muted text-center">没有记录</div>
                    </td>
                </tr>
            </notempty>
        </tbody>
    </table>

    <!-- 分页 -->
    <ul class="pagination pagination-edit">{$page}</ul>
</block>